import req from '../fetch/index.js'

const config = {
    getTableData: {
        url: '/pc/hotGood/listHotGood',
        method:'post'
  },
  // 新增热门位商品
  addHotGood: {
    url: '/pc/hotGood/addHotGood',
    method:"post"
  },
  // 新增热门位待选商品查询
  hotgetTableData: {
    url: '/pc/good/listSaleGood',
        method:'post'
  },
  // 查询热门位商品
  getHotGood: {
    url: '/pc/hotGood/getHotGood',
    method:'post'
  },
  // 修改提交
  updateHotGood: {
    url: '/pc/hotGood/updateHotGood',
    method:'post'
  },
  // 删除热门位商品
deleteHotGoods: {
  url: '/pc/hotGood/deleteHotGood',
  method:'post'
  },
// 查询热门商品数量设置
getHotGoodNumber: {
  url: '/pc/dictory/getHotGoodNumber',
  method: 'post'
  },
  // 修改热门商品数量
updateHotGoodNumber: {
  url: '/pc/dictory/updateHotGoodNumber',
  method: 'post'
  }

}

const request = function (funcName, requestParam) {
  return req(config[funcName].url, config[funcName].method, requestParam, {}, config[funcName].fileConfig)
}
export default request
